#if !USE_CONSOLE

#ifndef RENDER_PANEL_H
#define RENDER_PANEL_H

#include <QWidget>
#include <QtGui>

#include "src/scene/scene.h"
#include "src/interface/glwidget.h"
#include "src/interface/imageDialog.h"

class RenderPanel : public QWidget {
	Q_OBJECT

//    signals:
//        void update();

    public:
        RenderPanel(QWidget * = 0, GLWidget * = NULL);
        ~RenderPanel();

        void setSceneInImage();
        void setRender(){clear(); createLayout(); setSceneInImage();};

    public slots:
        void enableHBBPushButton(){hbbTreePushButton->setEnabled(true); renderRaytracingPushButton->setEnabled(true); emitPhotonsPushButton->setEnabled(true); renderPhotonsPushButton->setEnabled(true);};

    private slots:
        void renderPhotons();
        void emitPhotons();
        void startRendering();
        void startHBBTree();
        void changeRenderType(int);
        void changeRaytracingDepth(int);
        void changePhotonsDepth(int);
        void changeEmitMaxPhotons(int);
        void changeMaxNearestPhotons(int);
        void changeMaxRadius(double);
        void changeEmitCausticMaxPhotons(int);
        void changeCausticMaxNearestPhotons(int);
        void changeCausticMaxRadius(double);
        void changeFilterType(int);
        void changeConeFilterConstant(double);
        void changeKeepFirstBounce(bool);
        void changeTestReflexion(int);

    private:
        bool renderType;
        GLWidget *canvas;

        QGroupBox *raytracingGroupBox;
        QGroupBox *photonMappingGroupBox;

        QPushButton *hbbTreePushButton;
        QPushButton *emitPhotonsPushButton;
        QPushButton *renderPhotonsPushButton;
        QPushButton *renderRaytracingPushButton;

        QLabel *photonMappingConeFilterConstantLabel;
        QDoubleSpinBox *photonMappingConeFilterConstantDoubleSpinBox;

        ImageDialog *imageDlg;


        void createLayout();
        void clear();
};

#endif

#endif //!USE_CONSOLE


